import 'package:json_annotation/json_annotation.dart';

import 'text_style.dart';

part 'title.g.dart';

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class Title {
  var id;
  var show;
  var text;
  var link;
  var target;
  TextStyle? textStyle;
  var subText;
  var subLink;
  var subTarget;
  TextStyle? subtextStyle;
  var textAlign; //'auto', 'left', 'right', 'center'.
  var textVerticalAlign; //'auto', 'top', 'bottom', 'middle'
  var triggerEvent;
  var padding;
  var itemGap;
  var zlvel;
  var z;
  var left; //'left', 'center', or 'right' 20 20%
  var top; //'top', 'middle', or 'bottom' 20 20%
  var right; //'auto' 20 20%
  var bottom; //auto 20 20%
  var background;
  var borderColor;
  var borderWidth;
  var borderRadius;
  var shadowBlur;
  var shadowColor;
  var shadowOffsetX;
  var shadowOffsetY;

  Title(
      {this.id,
      this.show,
      this.text,
      this.link,
      this.target,
      this.textStyle,
      this.subText,
      this.subLink,
      this.subTarget,
      this.subtextStyle,
      this.textAlign,
      this.textVerticalAlign,
      this.triggerEvent,
      this.padding,
      this.itemGap,
      this.zlvel,
      this.z,
      this.left,
      this.top,
      this.right,
      this.bottom,
      this.background,
      this.borderColor,
      this.borderWidth,
      this.borderRadius,
      this.shadowBlur,
      this.shadowColor,
      this.shadowOffsetX,
      this.shadowOffsetY});

  factory Title.fromJson(Map<String, dynamic> json) => _$TitleFromJson(json);

  Map<String, dynamic> toJson() => _$TitleToJson(this);
}
